package cc.yugu.yhdw.webserver.persistence.hdw;


import cc.yugu.yhdw.common.domain.hdw.Rescuer;
import cc.yugu.yhdw.common.persistence.MasterMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
 * 移动救援
 *
 * @Date:Created in 2018/7/2 9:38
 * @Author:
 * @Modified By: zjn 2018/7/2 9:38
 */
public interface RescuerMapper extends MasterMapper {
    /**
    * 查询表hdw_rescuer，返回行数
    *
    * @Param: [property, value]
    * @Return: int
    * @Author By: zjn 2018/7/2  9:38
    */
    public int hasRecordByProperty(@Param("property") String property, @Param("value") Object value);
    /**
    * 按主键查询
    *
    * @Param: [id]
    * @Return: cc.yugu.yhdw.common.domain.hdw.Rescuer
    * @Author By: zjn 2018/7/2  9:38
    */
    public Rescuer find(int id);
    /**
    * 按运营商id查询
    *
    * @Param: [agentId]
    * @Return: java.util.List<cc.yugu.yhdw.common.domain.hdw.Rescuer>
    * @Author By: zjn 2018/7/2  9:38
    */
    public List<Rescuer> findByAgent(@Param("agentId") int agentId);
    /**
    * 按条件查询，返回行数
    *
    * @Param: [search]
    * @Return: int
    * @Author By: zjn 2018/7/2  9:38
    */
    public int findPageCount(Rescuer search);
    /**
    * 分页查询
    *
    * @Param: [search]
    * @Return: java.util.List<cc.yugu.yhdw.common.domain.hdw.Rescuer>
    * @Author By: zjn 2018/7/2  9:38
    */
    public List<Rescuer> findPageResult(Rescuer search);
    /**
    * 插入
    *
    * @Param: [entity]
    * @Return: int
    * @Author By: zjn 2018/7/2  9:38
    */
    public int insert(Rescuer entity);
    /**
    * 根据主键更新
    *
    * @Param: [entity]
    * @Return: int
    * @Author By: zjn 2018/7/2  9:38
    */
    public int update(Rescuer entity);
    /**
    * 根据主键删除
    *
    * @Param: [id]
    * @Return: int
    * @Author By: zjn 2018/7/2  9:38
    */
    public int delete(int id);
    /**
    * 根据运营商id删除
    *
    * @Param: [id]
    * @Return: int
    * @Author By: zjn 2018/7/2  9:39
    */
    public int deleteByAgent(int id);
}
